package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2024-06-18
 * Time: 15:21
 */
public class Test {
    public static void drawMap(Shape shape){
        shape.draw();
    }
    public static void main(String[] args) {
        Shape shape = new Rect();
        //匿名对象
        drawMap(new Rect());
        drawMap(new Cycle());


    }
}
